package cn.yunhe.biz;

import cn.yunhe.bean.Admin;
import cn.yunhe.dao.AdminMapper;
import cn.yunhe.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class AdminService {

    SqlSession session=SqlSessionFactoryUtil.getSqlSession();
    AdminMapper adminmapper=session.getMapper(AdminMapper.class);
    public Admin adminLogin(Admin admin){
        return adminmapper.adminLogin(admin);
    }
    public int insertAdmin(Admin admin) {
        int flag=adminmapper.insertAdmin(admin);
        session.commit();
        return flag;
    }
}
